/*
	Copyright (C) 2009 Salil Bhagurkar
	
	This file is part of ViSE
	
	ViSE is free software: you can redistribute it and/or modify
	it under the terms of the GNU Lesser General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.
	
	ViSE is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU Lesser General Public License for more details.
	
	You should have received a copy of the GNU Lesser General Public License
	along with ViSE.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _MALLOC_H_
#define _MALLOC_H_


/*A very simple memory allocator currently until the mallocator from earlier kernels or some other is ported*/


void *malloc(u32 sz);
int free(void *mem);

void init_malloc();

#define new(a) (a *)malloc(sizeof(a))

#define newarr(a,n) (a *)malloc(n * sizeof(a))

#endif
